local stats = {
    x = 30,
    y = 30,
    space = 30
}

local labels = {
    "canvases",
    "texturememory",
    "drawcalls",
    "drawcallsbatched",
    "fonts",
    "canvasswitches",
    "shaderswitches",
    "images",
    "fps"
}
function stats.on()
    stats.Texts = {}
    for i, key in ipairs(labels) do
        stats.Texts[key] = love.graphics.newText(love.graphics.getFont(), key.." 0")
    end
end

function stats.off()
end

function stats.draw()
    local sts = love.graphics.getStats()
    for k, v in pairs(sts) do
        stats.Texts[k]:set(k.." "..v)
    end
    stats.Texts.fps:set("fps "..love.timer.getFPS())
    for i, key in ipairs(labels) do
        love.graphics.draw(stats.Texts[key], stats.x, stats.y + (i - 1) * stats.space)
    end
end

return stats